﻿using System.Windows.Controls;

namespace FR.SAFTAnalyser.Views
{
    /// <summary>
    /// Interaction logic for InvoicesView.xaml
    /// </summary>
    public partial class InvoicesView : UserControl
    {
        public InvoicesView()
        {
            InitializeComponent();
        }

        private void dataGridInvoices_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dataGridInvoiceLines.SelectedItem != null)
                dataGridInvoiceLines.ScrollIntoView(dataGridInvoiceLines.SelectedItem);
        }

        private void dataGridInvoiceLines_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (dataGridInvoiceLines.SelectedItem != null)
                dataGridInvoiceLines.ScrollIntoView(dataGridInvoiceLines.SelectedItem);
        }
    }
}
